package com.wxzz.elearing.livetelecast.api.app;


import com.wxzz.elearing.livetelecast.service.ILivetelecastCategoryService;
import com.wxzz.elearning.common.vo.ReturnVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author
 * @since 2021-04-02
 */
@RestController
@RequestMapping("/wx-livetelecast-category")
@Api(tags = "直播分类接口(小程序)")
public class WxLivetelecastCategoryController {

    @Autowired
    private ILivetelecastCategoryService livetelecastCategoryService;

    @ApiOperation(value = "展示直播分类一级(小程序)", notes = "展示直播分类一级(小程序)", httpMethod = "POST", tags = "小程序")
    @RequestMapping(value = "listAllLivetelecastCategory", method = RequestMethod.POST)
    public ReturnVO listAllLivetelecastCategory() {
        return livetelecastCategoryService.listAllLivetelecastCategory(0L);
    }

    @ApiOperation(value = "展示直播分类二级(小程序)", notes = "展示直播分类二级(小程序)", httpMethod = "POST", tags = "小程序")
    @RequestMapping(value = "listAllLivetelecastCategorySecond/{pid}", method = RequestMethod.POST)
    public ReturnVO listAllLivetelecastCategorySecond(@ApiParam("父级分类id 展示一级传0") @PathVariable Long pid) {
        return livetelecastCategoryService.listAllLivetelecastCategory(pid);
    }


}
